Skip to content

feat(tui): start the dev server when dev is picked from the menu - #2469

Merged
AlexanderRichey merged 1 commit into
refactorfrom
feat/tui-dev-handoff
Sep 30, 2026
Merged

AlexanderRichey merged 1 commit into
refactorfrom
feat/tui-dev-handoff

Conversation

@AlexanderRichey

Copy link
Copy Markdown
Contributor

Description

Picking dev in the interactive menu used to open a help page saying the command runs from the command line, so the user had to quit and type agentcore dev themselves. Now the menu closes and the dev server starts, just as if agentcore dev had been typed. Global flags given when the menu was opened (such as --region) carry over. Region choices made inside the menu do not.

  • The dev command runs only after the menu has fully closed and the terminal is restored. It goes through the normal command path, so its usual checks (such as requiring a project) still apply.
  • When dev stops, the CLI exits rather than returning to the menu. This differs from runtime shell, which pauses the menu and comes back to it. Doing that for dev would mean restructuring how the dev command starts up; that is left as a possible follow-up.
  • Other command-line-only commands still open their help page.

Related Issue

Closes #

Documentation PR

Not applicable. The command reference is unchanged because no command names, flags, or descriptions changed.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran bun test
  • I ran the relevant end-to-end tests with bun run test:e2e, or explained why they are not applicable. Not applicable: the change affects only the interactive menu, which the end-to-end suite does not drive.
  • I ran bun run typecheck
  • I ran bun run lint:check
  • I ran bun run format:check
  • I ran bun run build
  • If I modified src/assets/, I updated affected snapshots with bun test <test-file> --update-snapshots and committed them

New tests open the menu outside a project, pick dev, and check that the dev command's own "not in a project" error comes back, which shows the command actually ran. A second test checks that launch flags are passed along.

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

💘 Generated with Crush

@github-actions github-actions Bot added the size/m PR size: M label Sep 30, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added agentcore-harness-reviewing AgentCore Harness review in progress claude-security-reviewing Claude Code /security-review in progress labels Sep 30, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 30, 2026

@agentcore-devx-automation agentcore-devx-automation Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AgentCore Harness Review

Verdict: Looks good

Nice, clean design. A few things I checked and think are worth noting rather than blocking on:

  • handoffArgs correctly filters to getOptionValueSource === "cli" so defaults and env-sourced values aren't re-emitted (env is re-read on the second parse anyway), and the boolean value === !option.negate handling covers both --flag and --no-flag cases. The added unit test locks this in.
  • The handoff test in tui.test.tsx uses inTempDirectory + ttyTestIO and asserts on a real ProjectStateError bubbling out of dev, which is a proper behavior test — good use of real dependencies rather than mocking the router.
  • Re-entrancy is safe because dev is not in supportedTuiCommands, so its effective doesSupportTui() is false and withTuiWhenInteractive won't recursively launch the TUI on the handed-off invocation. Worth remembering if a future handed-off command is TUI-supported at its own node.
  • Telemetry-wise, the single CommandRunMetricEvent for the process will end up with is_tui: true (set in renderTuiAt) and command_path: ["agentcore","dev"] after the second parseAsync — that seems like the right attribution for a handoff.

Nothing that needs changing before merge.

@agentcore-devx-automation agentcore-devx-automation Bot removed the agentcore-harness-reviewing AgentCore Harness review in progress label Sep 30, 2026
@codecov-commenter

codecov-commenter commented Sep 30, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.87234% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.24%. Comparing base (95ba6ee) to head (aa58d3a).
⚠️ Report is 1 commits behind head on refactor.

Files with missing lines Patch % Lines
src/tui/handoff.ts 94.11% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##           refactor    #2469   +/-   ##
=========================================
  Coverage     97.24%   97.24%           
=========================================
  Files           615      617    +2     
  Lines         43804    43848   +44     
=========================================
+ Hits          42596    42639   +43     
- Misses         1208     1209    +1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

nborges-aws
nborges-aws previously approved these changes Sep 30, 2026

@nborges-aws nborges-aws left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM no findings

Picking dev in the interactive menu used to show its help and tell the
user to run `agentcore dev`. It now closes the menu and runs the dev
command with no arguments, keeping any global flags (such as --region)
the menu was launched with.

💘 Generated with Crush

Assisted-by: Crush:us.anthropic.claude-opus-5-5
@github-actions github-actions Bot added size/m PR size: M and removed size/m PR size: M labels Sep 30, 2026
@agentcore-devx-automation agentcore-devx-automation Bot added the claude-security-reviewing Claude Code /security-review in progress label Sep 30, 2026
@agentcore-devx-automation

Copy link
Copy Markdown
Contributor

Claude Security Review: no high-confidence findings. (run)

@agentcore-devx-automation agentcore-devx-automation Bot removed the claude-security-reviewing Claude Code /security-review in progress label Sep 30, 2026
@AlexanderRichey
AlexanderRichey merged commit 773cb64 into refactor Sep 30, 2026
18 checks passed
@AlexanderRichey
AlexanderRichey deleted the feat/tui-dev-handoff branch September 30, 2026 01:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants